import React from 'react';
import {Provider} from 'react-redux'
import store from 'store'
import { HashRouter, Redirect, Route, Switch, Link, BrowserRouter } from 'react-router-dom';
import './scss/app.scss';
import './scss/reset.css';
import Index from 'bundle-loader?lazy&name=bundle.index!page/index';
import Other from 'bundle-loader?lazy&name=bundle.other!page/other';
import ShoppingCart from 'bundle-loader?lazy&name=bundle.shoppingCart!page/shoppingCart';
import History from 'bundle-loader?lazy&name=bundle.history!page/history';
import lazyLoad from 'components/bundleLoader';
const App = () => {
	return (
		<Provider store={store}>
		<HashRouter>
			<Switch>
				<Route path="/index" component={lazyLoad(Index)} />
				<Route path="/other" component={lazyLoad(Other)} />
				<Route path="/shoppingCart" component={lazyLoad(ShoppingCart)} />
				<Route path="/history" component={lazyLoad(History)} />
				<Redirect from="/*" to="/index" />
			</Switch>
		</HashRouter>
		</Provider>
	);
};
export default App;
